/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package be.esi.athanfree.bd;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Yacine
 */
@Entity
@Table(name = "HADDITH")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Haddith.findAll", query = "SELECT h FROM Haddith h"),
    @NamedQuery(name = "Haddith.findById", query = "SELECT h FROM Haddith h WHERE h.id = :id"),
    @NamedQuery(name = "Haddith.findByLibell\u00e9", query = "SELECT h FROM Haddith h WHERE h.libell\u00e9 = :libell\u00e9"),
    @NamedQuery(name = "Haddith.findByRapport\u00e9", query = "SELECT h FROM Haddith h WHERE h.rapport\u00e9 = :rapport\u00e9"),
    @NamedQuery(name = "Haddith.findByFiable", query = "SELECT h FROM Haddith h WHERE h.fiable = :fiable")})
public class Haddith implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @Column(name = "LIBELL\u00c9")
    private String libellé;
    @Basic(optional = false)
    @Column(name = "RAPPORT\u00c9")
    private String rapporté;
    @Basic(optional = false)
    @Column(name = "FIABLE")
    private char fiable;

    public Haddith() {
    }

    public Haddith(Long id) {
        this.id = id;
    }

    public Haddith(Long id, String libellé, String rapporté, char fiable) {
        this.id = id;
        this.libellé = libellé;
        this.rapporté = rapporté;
        this.fiable = fiable;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLibellé() {
        return libellé;
    }

    public void setLibellé(String libellé) {
        this.libellé = libellé;
    }

    public String getRapporté() {
        return rapporté;
    }

    public void setRapporté(String rapporté) {
        this.rapporté = rapporté;
    }

    public char getFiable() {
        return fiable;
    }

    public void setFiable(char fiable) {
        this.fiable = fiable;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Haddith)) {
            return false;
        }
        Haddith other = (Haddith) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "be.esi.athanfree.bd.Haddith[ id=" + id + " ]";
    }
    
}
